﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="HQWeb.View.CustomerManage.Edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>客户信息</title>
    <link href="../../Styles/Site.css" rel="Stylesheet" type="text/css" />
     <script language="javascript" type="text/javascript" src="../../My97DatePicker/WdatePicker.js"></script>
     <script type="text/javascript">
         //缩放功能
         function expandcollapse(obj, row) {
             var div = document.getElementById(obj);
             var img = document.getElementById(row);

             if (div.style.display == "none") {
                 div.style.display = "";
                 img.src = "../../Images/more.gif";
                 img.alt = "关闭显示";
             }
             else {
                 div.style.display = "none";
                 img.src = "../../Images/more.gif";
                 img.alt = "显示下级菜单";
             }
         }

         function JSValidator(objid, express) {
             var obj = document.getElementById(objid);
             if (obj != null) {
                 switch (express) {
                     case "GROOM_NAMEISEmpty": if (obj.value == "") {
                             document.getElementById("GROOM_NAME").style.display = "";
                         } else {
                             document.getElementById("GROOM_NAME").style.display = "none";
                         } break;
                    case "BRIDE_NAMEISEmpty": if (obj.value == "") {
                            document.getElementById("BRIDE_NAME").style.display = "";
                        } else {
                            document.getElementById("BRIDE_NAME").style.display = "none";
                        } break;
                    case "GROOM_AGE": var reg = new RegExp("^[-]?[0-9]+[\.]?[0-9]+$"); if (!reg.test(obj.value)) {
                            document.getElementById("GROOMAGE").style.display = "";
                        } else {
                            document.getElementById("GROOMAGE").style.display = "none";
                        } break;
                    case "BRIDE_AGE": var reg = new RegExp("^[-]?[0-9]+[\.]?[0-9]+$"); if (!reg.test(obj.value)) {
                            document.getElementById("BRIDEAGE").style.display = "";
                        } else {
                            document.getElementById("BRIDEAGE").style.display = "none";
                        } break;
                    case "GROOM_PHONE": var reg = new RegExp("^[0-9]*[1-9][0-9]*$"); if (!reg.test(obj.value)) {
                            document.getElementById("GROOMPHONE").style.display = "";
                        } else {
                            document.getElementById("GROOMPHONE").style.display = "none";
                        } break;
                    case "BRIDE_PHONE": var reg = new RegExp("^[0-9]*[1-9][0-9]*$"); if (!reg.test(obj.value)) {
                            document.getElementById("BRIDEPHONE").style.display = "";
                        } else {
                            document.getElementById("BRIDEPHONE").style.display = "none";
                        } break;
                    case "GROOM_QQ": var reg = new RegExp("^[0-9]*[1-9][0-9]*$"); if (!reg.test(obj.value)) {
                            document.getElementById("GROOMQQ").style.display = "";
                        } else {
                            document.getElementById("GROOMQQ").style.display = "none";
                        } break;
                    case "BRIDE_QQ": var reg = new RegExp("^[0-9]*[1-9][0-9]*$"); if (!reg.test(obj.value)) {
                            document.getElementById("BRIDEQQ").style.display = "";
                        } else {
                            document.getElementById("BRIDEQQ").style.display = "none";
                        } break;
                 }
             }
        }

        function ValidatorAll() {
            if (document.getElementById("txtGROOM_NAME").value == "" || document.getElementById("txtGROOM_NAME").value == "") {
                alert("新郎或新娘的姓名不能为空！");
                return false;
            }
            else {
                return true;
            }
        }
     </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="vertical-align: middle;">
       <%-- <div style="height: 32;">
            &nbsp;</div>--%>
        <table  width="98%">
            <tr>
                <td colspan="4" class="title">
                    <asp:Label runat="server" ID="labTitle" Text="客户信息"></asp:Label>
                </td>
            </tr>
            <tr>
                 <td align="right" style="width: 20%">
                    新郎姓名：
                </td>
                <td style="width: 30%;" >
                    <%--<asp:TextBox ID="txtGROOM_NAME" runat="server">
                       </asp:TextBox>--%><div>
                       <input type="text" id="txtGROOM_NAME" oninput="JSValidator('txtGROOM_NAME','GROOM_NAMEISEmpty')"  onpropertychange="JSValidator('txtGROOM_NAME','GROOM_NAMEISEmpty')" runat="server" /><span style="color:Red">*</span><div id="GROOM_NAME" style=" display:none; color:Red; float:right">请您输入姓名！</div></div> 
                </td>
                   <td align="right" style="width: 20%">
                    新娘姓名：
                </td>
                <td style="width: 30%;">
                    <%--<asp:TextBox ID="txtBRIDE_NAME" runat="server"></asp:TextBox>--%> 
                    <input type="text" id="txtBRIDE_NAME" runat="server" oninput="JSValidator('txtBRIDE_NAME','BRIDE_NAMEISEmpty')" onpropertychange="JSValidator('txtBRIDE_NAME','BRIDE_NAMEISEmpty')" /><span style="color:Red">*</span><div id="BRIDE_NAME" style=" display:none; color:Red; float:right">请您输入姓名！</div>
                </td>
            </tr>
            <tr>
                 <td align="right" style="width: 20%">
                    新郎年龄：
                </td>
                <td style="width: 30%">
                    <%--<asp:TextBox ID="txtGROOMAGE" runat="server"></asp:TextBox>--%>
                    <input type="text" runat="server" id="txtGROOMAGE" oninput="JSValidator('txtGROOMAGE','GROOM_AGE')" onpropertychange="JSValidator('txtGROOMAGE','GROOM_AGE')" /><div id="GROOMAGE" style=" display:none; color:Red ; float:right">请您输入正确的年龄！</div>
                </td>
                <td align="right" style="width: 20%">
                    新娘年龄：
                </td>
<%--                <th align="right">
                    新娘年龄：
                </th>--%>
                <td style="width: 30%">
                 <input type="text" runat="server" id="txtBRIDEAGE" oninput="JSValidator('txtBRIDEAGE','BRIDE_AGE')" onpropertychange="JSValidator('txtBRIDEAGE','BRIDE_AGE')" /><div id="BRIDEAGE" style=" display:none; color:Red; float:right">请您输入正确的年龄！</div>
                </td>
            </tr>
             <%--<tr>
                <td colspan="4" style="border-color: transparent;" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                 <td align="right" style="width: 20%">
                    新郎电话：
                </td>
<%--                <th align="right">
                    新郎电话：
                </th>--%>
                <td style="width: 30%">
                  <input type="text" runat="server" id="txtGROOMPHONE" oninput="JSValidator('txtGROOMPHONE','GROOM_PHONE')" onpropertychange="JSValidator('txtGROOMPHONE','GROOM_PHONE')" /><div id="GROOMPHONE" style=" display:none; color:Red; float:right">输入正确的电话！</div>
                </td>
                 <td align="right" style="width: 20%">
                    新娘电话：
                </td>
                <%--<th align="right">
                    新娘电话：
                </th>--%>
                <td style="width: 30%">
                <input type="text" runat="server" id="txtBRIDEPHONE" onpropertychange="JSValidator('txtBRIDEPHONE','BRIDE_PHONE')" oninput="JSValidator('txtBRIDEPHONE','BRIDE_PHONE')" /><div id="BRIDEPHONE" style=" display:none; color:Red; float:right">输入正确的电话！</div>
                </td>
            </tr>
            <%--<tr>
                <td colspan="4" style="border-color: transparent;" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                <td align="right" style="width: 20%">
                    新郎QQ：
                </td>
                <%--<th align="right">
                    新郎QQ：
                </th>--%>
                <td style="width: 30%">
                <input type="text" runat="server" id="txtGROOMQQ" oninput="JSValidator('txtGROOMQQ','GROOM_QQ')" onpropertychange="JSValidator('txtGROOMQQ','GROOM_QQ')" /><div id="GROOMQQ" style=" display:none; color:Red; float:right">输入正确的QQ！</div>
                </td>
                <td align="right" style="width: 20%">
                    新娘QQ：
                </td>
              <%--  <th align="right">
                    新娘QQ：
                </th>--%>
                <td style="width: 30%">
                 <input type="text" runat="server" id="txtBRIDEQQ" oninput="JSValidator('txtBRIDEQQ','BRIDE_QQ')" onpropertychange="JSValidator('txtBRIDEQQ','BRIDE_QQ')" /><div id="BRIDEQQ" style=" display:none; color:Red; float:right">输入正确的QQ！</div>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 20%">
                    新房地址：
                </td> 
                <td style="width: 30%">
                    <asp:TextBox ID="txtHOUSEADDRESS" runat="server"></asp:TextBox>
                </td>
                 <td align="right" style="width: 20%">
                    娘家地址：
                </td>
                <td style="width: 30%">
                    <asp:TextBox ID="txtBRIDEADDRESS" runat="server"></asp:TextBox>
                </td>
            </tr>
             <tr>
              <td align="right" style="width: 20%">
                    婚礼日期：
                </td>
                <td style="width: 30%">
                    <%--<asp:TextBox ID="txtTIME" CssClass="fontsize" Height="26px" runat="server"
                        Width="200px"></asp:TextBox>--%>
                          <input id="d12" runat="server" type="text" onfocus="WdatePicker()" />
                    <img onclick="WdatePicker({el:'d12'})" src="../../My97DatePicker/skin/datePicker.gif"
                        align="middle" width="16" height="28">
                </td>
                <td align="right" style="width: 20%">
                    新房地址：
                </td>
                <%--<th align="right">
                    酒店：
                </th>--%>
                <td style="width: 30%">
                    <asp:TextBox ID="txtHOTEL" runat="server"></asp:TextBox> <a href="javascript:expandcollapse('MoreInformation', 'img_show');">
                        <img id="img_show" alt="点击显示/隐藏下级菜单" width="64px" border="0" src="../../Images/more.gif" />
                    </a>
                </td>
                <%-- <td align="right">
                    娘家地址：
                </td>--%>
            </tr>
             <%--<tr>
                <td style="border-color: transparent;" colspan="4" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <%--<tr><td colspan="4"></td></tr>--%>
                 <tbody id="MoreInformation" style="display: none">
            <tr>
                <td align="right" style="width: 20%">
                    新郎职务：
                </td>
                <%--<th align="right">
                    新郎职务：
                </th>--%>
                <td style="width: 30%">
                    <asp:TextBox ID="txtGROOMPOST" runat="server"></asp:TextBox>
                </td>
                <td align="right" style="width: 20%">
                    新娘职务：
                </td>
                <%--<th align="right">
                    新娘职务：
                </th>--%>
                <td style="width: 30%">
                    <asp:TextBox ID="txtBRIDEPOST" runat="server"></asp:TextBox>
                </td>
            </tr>
            <%--<tr>
                <td colspan="4" style="border-color: transparent;" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                <td align="right" style="width: 20%">
                    婚纱照交接情况：
                </td>
                 <%--<th align="right">
                    婚纱照交接情况：
                </th>--%>
                <td style="width: 30%">
                    <asp:TextBox ID="txtWEDDING" runat="server"></asp:TextBox>
                </td>
                <td align="right" style="width: 20%">
                    婚车负责人：
                </td>
                <%--<th align="right">
                    婚车负责人：
                </th>--%>
                <td style="width: 30%">
                    <asp:TextBox ID="txtMARRIAGECAR" runat="server"></asp:TextBox>
                </td>
            </tr>
             <%--<tr>
                <td style="border-color: transparent;" colspan="4" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                 <td align="right" style="width: 20%">
                    桌数：
                </td>
                <td style="width: 30%">
                    <asp:TextBox ID="txtTABLENUM" runat="server"></asp:TextBox>
                </td>
                <td align="right" style="width: 20%">
                    来宾中长辈数：
                </td>
                <td style="width: 30%">
                    <asp:TextBox ID="txtELDER" runat="server"></asp:TextBox>
                </td>
            </tr>
             <%--<tr>
                <td style="border-color: transparent;" colspan="4" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                <td align="right" style="width: 20%">
                    来宾中平辈数：
                </td>
                <td style="width: 30%">
                    <asp:TextBox ID="txtRANK" runat="server"></asp:TextBox>
                </td>
                <td align="right" style="width: 20%">
                    来宾中后辈数：
                </td>
                <td style="width: 30%">
                    <asp:TextBox ID="txtYOUNGER" runat="server"></asp:TextBox>
                </td>
            </tr>
            </tbody>
            <%--<tr>
                <td align="center" colspan="4">
                    <asp:Button runat="server" Height="26px" Font-Bold="true" ID="btnSave" Text="保 存" />
                </td>
            </tr>--%>
             <%--<tr>
                <td colspan="4" style="border-color: transparent;" height="12">
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
            <td align="center" colspan="4"><asp:Button runat="server" CssClass="s_btn" ID="btnSave" Text="保 存" onmousedown="this.className='s_btn s_btn_h'"
                onmouseout="this.className='s_btn'"  OnClick="btnSave_Click" />&nbsp;&nbsp;&nbsp;&nbsp; 
                <asp:Button runat="server" CssClass="s_btn" ID="btnReturn" Text="返 回" onmousedown="this.className='s_btn s_btn_h'"
                onmouseout="this.className='s_btn'" OnClick="btnReturn_Click" 
                    CausesValidation="False" /></td>
            </tr>
        </table>
        <div style="display:none">
        <asp:HiddenField runat="server" ID="customer" />
        </div>
    </div>
    </form>
</body>
</html>
